﻿@model Tuple<List<KimPhongCRM.Models.sp_Select_MainMenu_Parent_Result>, Dictionary<long, List<KimPhongCRM.Models.sp_Select_MainMenu_Children_Result>>>
@{
    ViewBag.Title = "Display";
    Layout = "";
}
<div class="span2 main-menu-span">
    <div class="nav-collapse sidebar-nav">
        <ul class="nav nav-tabs nav-stacked main-menu">
            @foreach (var item in Model.Item1)
            {
                @:<li>
                if (Model.Item2[item.MenuId].Count > 0)
                {
                    <a class="dropmenu" href="@Url.Action(item.MenuAction,item.MenuController)"><i class="@item.MenuSuffix"></i><span class="hidden-tablet">@item.MenuName</span></a>
                    <ul>
                        @foreach (var item2 in Model.Item2[item.MenuId])
                        {
                            <li><a class="submenu" href="@Url.Action(item2.MenuAction,item2.MenuController)"><i class="@item2.MenuSuffix"></i><span class="hidden-tablet">@item2.MenuName</span></a></li>
                        }
                    </ul>
                }
                else { 
                    <a href="@Url.Action(item.MenuAction,item.MenuController)"><i class="@item.MenuSuffix"></i><span class="hidden-tablet">@item.MenuName</span></a>
                }
                @:</li>
            }
        </ul>
    </div>
    <!--/.well -->
</div>
